package com.example.controller;

import com.example.dto.UserDto;
import com.example.service.impl.ListenerMyServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA2021.3
 *
 * @Author: Tenghw
 * @Date: 2022/09/26  16:58
 * @Description:
 */
@RestController
public class ListenerController {
    @Autowired
    ListenerMyServiceImpl listenerMyService;

    @GetMapping("testListener")
    public String testListener(UserDto userDto) {
        listenerMyService.testListenerPublisher(userDto);
        return "事件监听器 监听发布事件成功...";
    }
}
